luci-lib-ip: fix build error with LTO
authorAnari Jalakas <[email protected]>
Mon, 11 Nov 2024 19:00:46 +0000 (21:00 +0200)
committerPaul Donald <[email protected]>
Sun, 17 Nov 2024 22:23:42 +0000 (23:23 +0100)
Adding $(FPIC) parameter fixes building with CONFIG_USE_LTO enabled.

Signed-off-by: Anari Jalakas <[email protected]>
libs/luci-lib-ip/src/Makefile

index 76abd27d2a0cc4cbaaed2efd444621950420877d..ffed8a687020ac9af7c12d66c1c0ee44c1f4020d 100644 (file)
@@ -7,7 +7,7 @@ IP_LIB = ip.so
        $(CC) $(CPPFLAGS) $(CFLAGS) $(LUA_CFLAGS) $(IP_CFLAGS) $(FPIC) -c -o $@ $<
 
 compile: $(IP_OBJ)
-       $(CC) $(LDFLAGS) -shared -o $(IP_LIB) $(IP_OBJ) $(IP_LDFLAGS)
+       $(CC) $(LDFLAGS) -shared -o $(IP_LIB) $(IP_OBJ) $(IP_LDFLAGS) $(FPIC)
 
 install: compile
        mkdir -p $(DESTDIR)/usr/lib/lua/luci